Skip to content

Say what else returns -1 from the coroutine flock, and where it does not run - #19

Merged
EdmondDantes merged 1 commit into
true-asyncfrom
221-flock-comment-precision
Aug 12, 2026
Merged

Say what else returns -1 from the coroutine flock, and where it does not run#19
EdmondDantes merged 1 commit into
true-asyncfrom
221-flock-comment-precision

Conversation

@EdmondDantes

Copy link
Copy Markdown

Comments only, follow-up to #18, found by a second review.

The docblock of php_stdiop_flock_async() listed three of the four ways it returns without the lock — a retry timer that cannot be created or registered was missing, and it leaves an exception set, which a caller has to know about.

The comment above the PHP_STREAM_OPTION_LOCKING branch said that anything which can wait goes to the coroutine. Two clauses of the condition it annotates say otherwise: with async off, and inside the scheduler, a waiting lock still blocks the whole thread.

…not run

The docblock listed three of the four ways the call comes back without the lock; the
timer that fails to arm was missing. The branch comment claimed everything that can
wait goes to the coroutine, while two clauses of the condition it sits above send a
waiting lock to the blocking syscall instead.
@EdmondDantes
EdmondDantes requested a review from bukka as a code owner August 12, 2026 21:39
@EdmondDantes
EdmondDantes merged commit 4285cb4 into true-async Aug 12, 2026
2 checks passed
@EdmondDantes
EdmondDantes deleted the 221-flock-comment-precision branch August 13, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant